package apiUtils.apis.account;

import android.content.Context;

import org.json.JSONException;

import apiUtils.params.Params;
import constant.ApiConstants;

/**
 * 账户验证接口
 */
public class VerifyAccountAPI extends BaseAccountAPI {
    private static final String tag = "VerifyAccountAPI";
    private static final String url = ApiConstants.DOMAIN_NAME + "checkAccountAndPws";

    public VerifyAccountAPI(Context context) {
        super(context);
    }

    public void verifyAccount(String subType, String userAccount, String userPwd, final Listener listener) {
        mSubType = subType;
        mUserAccount = userAccount;
        mUserPwd = userPwd;
        post(tag, url, listener);
    }

    @Override
    protected Params initParams() throws JSONException {
        initAccountParams();
        mApiParams.put("userAccount", mUserAccount);
        mApiParams.put("userPwd", mUserPwd);
        return mApiParams;
    }
}
